<!doctype html> 
<html ng-app='text'> 
<head> 
    <meta charset="utf-8"> 
    <title></title>
    <style type="text/css">


    </style> 
    <script type="text/javascript" src='angular.js'></script>
    <script type="text/javascript">
   		var app = angular.module('text',[]);
   		app.controller('const',function ($scope){
   			$scope.now = 0;
   			$scope.fn = function(n){
   				$scope.now = n;
   			}
   			$scope.arr = [1,2,3];
   		})

    </script>
</head>
<body ng-controller='const'>
<input ng-repeat='i in arr' value={{i}} type='button' ng-click ='fn($index)'>
<div>{{now}}</div>
</body>
</html>